package org.sonar.template.java;

import org.sonar.api.Plugin;

/**
 * 自定义插件的入口
 */
public class JavaCustomRulesPlugin implements Plugin {

    @Override
    public void define(Context context) {

        /**
         * server extensions -> objects are instantiated during server startup
         * 自定义规则的definition添加到组件中
         */
        context.addExtension(JavaCustomRulesDefinition.class);

        /**
         * batch extensions -> objects are instantiated during code analysis
         * 将检查的类注册到组件中
         */
        context.addExtension(JavaCustomRulesCheckRegistrar.class);

    }
}
